package com.limanyik.family.gateway.factory;

import com.limanyik.family.gateway.filter.AuthenticateFilter;
import com.limanyik.family.gateway.filter.HttpResponseFilter;
import com.limanyik.family.gateway.filter.PermissionFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 组件注册工厂
 */
@Configuration
public class BaseModuleFactory {

    /**
     * 认证过滤器
     *
     * @return
     */
    @Bean
    public AuthenticateFilter getAuthenticateFilter() {
        return new AuthenticateFilter();
    }

    /**
     * 权限过滤器
     *
     * @return
     */
    @Bean
    public PermissionFilter getPermissionFilter() {
        return new PermissionFilter();
    }

    /**
     * 全局响应拦截
     *
     * @return
     */
    @Bean
    public HttpResponseFilter getHttpResponseFilter() {
        return new HttpResponseFilter();
    }

}
